<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <link href="https://docs.google.com/static/doclist/client/css/3489925520-doclisthome.css" />

    <h:head>
        <title>Pedido de Pastel</title>
        <style type="text/css">
            *{
                font-family: fantasy;
            }
            #lista tr td{
                border : black ;
            }
        </style>
    </h:head>
    <h:body>
        <div  style="float:left;">
            <h1>Seu Pedido</h1>
        <h:form>
            Cliente:<h:inputText value="#{bean.cliente}"/><br/>
            Tipo:
            <h:selectOneRadio value="#{bean.tipo}">
                <f:selectItems value="#{bean.opcoesTipo}" />
            </h:selectOneRadio>
            <br/><br/>
            Você conheceu o pastel:<br/>
            <h:selectManyCheckbox value="#{bean.escolhaFonte}">
                <f:selectItems value="#{bean.opcoesFonte}"/>
            </h:selectManyCheckbox>
            <br/>
            Sabor
            <h:selectManyListbox value="#{bean.escolhaPastel}">
                <f:selectItems var="pastel" value="#{bean.opcoesPastel}" itemLabel="#{pastel.sabor}" itemValue="#{pastel}" />
            </h:selectManyListbox>
            <br/>
            <br/>
            <h:commandButton value="OK"/>
            <h:commandButton value="Limpar" action="#{bean.limparCampos}"/>
        </h:form>
        </div>
        <div style="float: left;margin-left: 30px">
            <h1>Lista de Pasteis</h1>
            <br />
            <h:dataTable id="lista" var="aux" value="#{bean.escolhaPastel}">
                <h:column>
                    <f:facet name="header">Sabor</f:facet>
                    #{aux.sabor}
                </h:column>
                <h:column>
                    <f:facet name="header">Preço</f:facet>
                    #{aux.valor}
                </h:column>
            </h:dataTable>
        </div>
    </h:body>
</html>

